home *** CD-ROM | disk | FTP | other *** search
-
- /* TRUNCATE.C
-
- Copyright (c) 1984, Gordon Lee Waite
- 413 W. Pleasant Street
- Maquoketa, IA 52060
-
- summary: truncate infile outfile length
-
- arguments: length is the position at which the program will
- truncate each line in the input file.
-
- infile is the name of the input file.
-
- outfile is the name of the output file.
-
- options: none
-
- description:
-
- Truncate is used to truncate the lines in a file. Each line
- is read from the input file, and if it is longer than the
- specified length, it is truncated to the newly specified
- length. The length is figured before any newline or CR-LF pair
- is added. This program will put a newline at the end of
- each line.
-
- Example: truncate myfile yourfile 40
-
- The above command line will read the file "myfile", and
- truncate each of its lines to 40 characters. The resulting
- file will be called "yourfile."
-
- Note: If a line is shorter than the specified length, it will
- not be changed by TRUNCATE.
-
- */
-
- ed "yourfile."
-
- Note: If a line is shorter than the specified length, it will
- not be changed by TRUNCATE.
-